【新手问题】Graphics不显示

您所在的位置:网站首页 Android 背景外 不绘制 【新手问题】Graphics不显示

【新手问题】Graphics不显示

2024-05-31 00:19| 来源: 网络整理| 查看: 265

结构是打算做成这样:所有的界面都有一个根节点,显示Panel的时候如果是modal就创建一个modal背景在panel的后面。 所以modal的父级和panel的父级一样,现在是panel通过prefab加载创建出来正常显示。modal不显示。 show的代码是这样: async show(container?: Node, modal?: boolean) { await this.load(); if (container) { this._container = container; } if (!this._container) { this._container = UILayer.inst.getPanelLayer(); } this._container.on(Node.EventType.SIZE_CHANGED, this.onParentSizeChange, this); if (modal) { if (!this._modalNode) { this._modalNode = this.createModal(); } else { this._modalNode.active = true; } this._container.addChild(this._modalNode); } this.doShow(); const t = this.getShowTween(); t && t.start(); }



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3